package com.mystnihon.tdroid.manager.ftp;


import java.io.IOException;

import org.apache.commons.net.ftp.FTPFile;

public interface FTPInterface {
	/**
	 * Method to connect to the FTP server
	 * 
	 * @param host
	 *            the host or URL of the server without any scheme (ftp:// or ftps://)
	 * @param port
	 *            the port of the server
	 */
	public void connect(String host, int port);

	/**
	 * Method to login on the FTP server once connected. You should use {@link FTPInterface#connect(String, int)} before
	 * to call this method.
	 * 
	 * @param login
	 *            the login
	 * @param password
	 *            the password
	 */
	public void login(String login, String password);

	/**
	 * List the different directories.
	 */
	public void listDirectories();

	/**
	 * List the subdirectory of a directory.
	 * 
	 * @param directory
	 */
	public void listDirectories(String directory);

	public void listFiles();

	public void listFiles(String directory);

	public void download(FTPFile file);

	public void disconnect() throws IllegalStateException, IOException;

}